home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagd_f.zip / EGAVGA.SWG / 0057_VGA Wait for retrace.pas < prev    next >
Pascal/Delphi Source File  |  1993-08-27  |  439b  |  16 lines

  1. {
  2. > Does anybody know how to wait for the retrace before drawing a new
  3. > screen to eliminate flicker?
  4.  
  5. Here's the procedure from a PD unit called SuperVGA (by Steve Madsen):
  6.  
  7. Waits for a verticle retrace to complete before exiting.  Useful
  8. for reducing flicker in video intensive operations, like color cycling.
  9. }
  10.  
  11. PROCEDURE WaitRetrace;
  12. begin
  13.   while ((Port[$3DA] AND 8) > 0) do;
  14.   while ((Port[$3DA] AND 8) = 0) do;
  15. end;
  16.